package com.itg.vms.service.impl;

import com.itg.vms.dao.CollectMoviesDao;
import com.itg.vms.dao.impl.CollectMoviesDaoImpl;
import com.itg.vms.entity.Movies;
import com.itg.vms.service.CollectMoviesService;

import java.util.List;

public class CollectMoviesServiceImpl implements CollectMoviesService {
    CollectMoviesDao collectMoviesDao = new CollectMoviesDaoImpl();

    /**
     * 收藏影片业务实现类
     * @param userId
     * @param movieId
     * @return
     */
    @Override
    public boolean addCollectMovies(Long userId, Long movieId,String username) {
        return collectMoviesDao.addCollectMovies(userId, movieId,username);
    }

    /**
     * 实现类
     * @param userId
     * @return
     */
    @Override
    public List<Movies> selectAllCollectMovies(Long userId) {
        return collectMoviesDao.selectAllCollectMovies(userId);
    }

    /**
     * 删除影片实现
     * @param userId
     * @param movieId
     * @return
     */
    @Override
    public boolean deleteCollectMovies(Long userId, Long movieId) {
        return collectMoviesDao.deleteCollectMovies(userId, movieId);
    }


}
